<?php
require_once('../../auth/auth.php');

//get values from POST	 
	$num_adults=$_POST['num_adults'];
	$num_children=$_POST['num_children'];
	$toyOK=$_POST['toyOK'];
	$deliveryOK=$_POST['deliveryOK'];
	$spanishOK=$_POST['spanishOK'];
	$other=$_POST['other'];
	
include 'db_Connect.php';
	
$preference = "UPDATE AdoptionPreferences SET num_adults='".$num_adults
			."', num_children='".$num_children
			."', toyOK='".$toyOK
			."', deliveryOK='".$deliveryOK
			."', spanishOK='".$spanishOK
			."', other='".$other
			."' WHERE user_id='".$_SESSION['SESS_USER_ID']."'";
$result = mysql_query($preference);	//preferences update executes

if($result){
	echo("<br>Adoption preferences update succeeded");
	header("Location:../preference.php");
} else{
	echo("<br>Adoption preferences update failed");
}

include 'db_Close.php';
?>

